<%@page contentType="text/html; charset=UTF-8"%>
<%@taglib uri="/WEB-INF/struts-tags.tld" prefix="s"%>
<%@taglib uri="/WEB-INF/wm.tld" prefix="wm"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>外卖管理系统</title>
<link rel="stylesheet" href="/css/admin.css" type="text/css"/>
<script type="text/javascript" src="/js/jquery-1.6.1.min.js"></script>
</head>
<body leftmargin="2" topmargin="2">
<fieldset><legend>饭店管理-查询参数选择：</legend>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
    <tr class="tdbg3" align="left"> 
    <td>
	<form name="add" id="add" method="get" action="admin_restaurant.action">
	&nbsp;名称:<s:textfield name="resName" id="resName" size="20"/>&nbsp;
   	 是否有效:
	 <s:select list="validList" name="valid" id="valid" listKey="key" listValue="value"></s:select>
	 显示:
	 <s:select list="isShowList" name="isShow" id="isShow" listKey="key" listValue="value"></s:select>
	<input value="查询" type="submit" /> 
	 </td>
	 </form>
    </tr>
</table>
</fieldset>
<s:url action="admin_restaurant?action=add" id="restaurantaddurl" />
<fieldset><legend>饭店管理：[<a href="${restaurantaddurl}">添加饭店</a>]</legend>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  <COLGROUP>
  <COL width="*" />
  <COL width="100" />
  <COL width="100" />
  <COL width="200" />
  <COL width="300" />
  <tr style="font-weight: bold;" align="center" class="tdbg2"> 
    <td>名称</td>
    <td>有效</td>
    <td>状态</td>
    <td>排序</td>
    <td>管理操作</td>
  </tr>
<s:iterator id="r" value="%{pageList.objectList}" status="st" >
<s:url action="admin_restaurant?action=del&id=${r.id}" id="restaurantdelurl" />
<s:url action="admin_restaurant?action=update&id=${r.id}" id="restaurantupdateurl" />
<s:url action="admin_restaurant?action=orders&id=${r.id}" id="restaurantordersurl" />
<s:url action="admin_restaurant_time?resId=${r.id}" id="timeurl" />
<s:url action="admin_restaurant_scriptorium_con?resId=${r.id}" id="conurl" />
    <tr class="tdbg3" align="center"> 
      <td><s:property value="#r.resName"/></td>
      <td>
      <s:if test="#r.valid==0">
      	无效
      </s:if>
      <s:if test="#r.valid==1">
      	有效
      </s:if>
      </td>
      <td>
      <s:if test="#r.isShow==0">
      	隐藏
      </s:if>
      <s:if test="#r.isShow==1">
      	显示
      </s:if>
      </td>
      <td>
      <s:property value="#r.orderNum"/> | <s:date name="#r.orderTime" format="yyyy-MM-dd HH:mm:ss"/>
      </td>
      <td>
      <a href="${restaurantupdateurl}">修改</a> | 
      <a href="${restaurantdelurl}" onclick="{if(confirm('执行此删除操作后该信息不能恢复，确定删除吗？')){return true;}return false;}">删除</a> | 
      <a href="${restaurantordersurl}">更新排序时间</a> | 
      <a href="${timeurl}">饭店时间</a> | 
      <a href="${conurl}">关联写字间</a> | 
      </td>
    </tr>
</s:iterator>
<tr align="center" class="tdbg2"> 
   <td colspan="5"><wm:pages value="%{pageList.pages}"/></td>
</tr>
</table>
</fieldset>
</body>
</html>
